import {baseAjax} from "../utils/baseAjax";

// 我的课程类型列表
export const listMyCourseType = (successHandle) => {
	return baseAjax({
		url: '/api/user/lesson/type',
		type: 'get',
		success: successHandle
	})
}
// 我的课程列表
export const listMyCourse = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/lesson/list',
		type: 'post',
		data,
		success: successHandle
	})
}
// 我的课程详情
export const getMyCourseDetail = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/lesson/detail',
		type: 'post',
		data,
		success: successHandle
	})
}
// 直播日历列表
export const listLive = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/lesson/live/day/list',
		type: 'post',
		data,
		success: successHandle
	})
}
// 课程表
export const getScheduleDetail = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/lesson/timeTable',
		type: 'post',
		data,
		success: successHandle
	})
}
// 练习记录
export const listExerciseRecord = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/exercise/list',
		type: 'post',
		data,
		success: successHandle
	})
}
// 学习报告
export const getStudyReport = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/lesson/study/report',
		type: 'post',
		data,
		success: successHandle
	})
}
// (回调)练习题记录保存-保存做题记录
export const saveExercise = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/exercise/callback/save',
		type: 'post',
		data,
		success: successHandle
	})
}
// 保存视频记录
export const saveVideoProgress = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/lesson/progress/save',
		type: 'post',
		data,
		success: successHandle
	})
}
// 单个视频最近一次观看历史进度
export const getVideoHistory = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/lesson/video/history',
		type: 'post',
		data,
		success: successHandle
	})
}
// 单个视频最近一次观看历史进度
export const doExerciseExercise = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/exercise/doExercise',
		type: 'post',
		data,
		success: successHandle
	})
}
// 单个视频最近一次观看历史进度
export const lessonStructure = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/lesson/structure',
		type: 'post',
		data,
		success: successHandle
	})
}
// 单个视频最近一次观看历史进度
export const structureDetail = (data, successHandle) => {
	return baseAjax({
		url: '/api/user/lesson/structure/detail',
		type: 'post',
		data,
		success: successHandle
	})
}
